1. Field of the Invention
The present invention relates to a technique of encoding a specific region of an image to image quality higher than in other regions.
2. Description of the Related Art
An image signal encoding technique is used to transfer or store/reproduce a moving image. As such a moving image encoding technique, an international standard encoding method such as ISO/IEC International Standard 14496-2 (MPEG-4 Visual) is known. As another international standard encoding method, H.264 and the like by ITU-T and ISO/IEC are also known. In this specification, ITU-T Rec. H.264 Advanced Video Coding 1 ISO/IEC International Standard 14496-10 (MPEG-4 AVC) will simply be referred to as H.264. These techniques are used in the fields of video camera and recorder as well. In particular, there is recently a vigorous effort going on to apply the techniques to surveillance video cameras (to be referred to as surveillance cameras hereinafter).
In application to a surveillance camera, image data is encoded at a relatively low bit rate to suppress the size of encoded data in many cases because of necessity of long-term recording. In the low bit rate encoding, however, a large amount of information is lost, and the image quality degrades. For this reason, the technique cannot function well to achieve the original object of, for example, specifying a human face. Instead of uniformly encoding a whole frame, there is generally used a technique of detecting a region such as a human face, which is supposed to be important for the application purpose, as a specific region so as to divide the frame into a specific region and other regions (nonspecific regions) and changing the code amount assignment for each region. More specifically, encoding is performed by assigning a large code amount to the specific region not to lower the image quality while suppressing the code amount only in the nonspecific regions.
In this technique, however, when a plurality of specific regions exist in a frame, and a large code amount is assigned to every specific region, the actual bit rate exceeds the target bit rate. On the other hand, if the code amount is uniformly assigned to all specific regions within the range of the target bit rate, image quality suitable for the application purpose of, for example, specifying a human face cannot be obtained in the specific regions. To solve these problems, techniques of controlling code amount assignment to each specific region have been proposed.
An example of such related arts is patent literature 1 (Japanese Patent Laid-Open No. 2010-193441). In patent literature 1, a specific region having a smaller area in a frame is assigned a larger code amount than that for a specific region having a larger area in the frame. This makes it possible to reliably create compressed data capable of clearly showing a face captured in a small size and also maintain image quality enough to recognize a face captured in a large size even with little decrease in the compression rate.
In the above-described related art, however, even if the area ratio of the specific regions to the frame is low, it may be impossible to obtain desired image quality when a lot of specific regions exist.